<template>
  <div class="bpl1-bg">
    <div class="el-flex">
      <div class="co-title-name">
        <img src="@/assets/cockpit/subdivision/securityOneMap/item9-title.png" alt="" />
      </div>
      <div class="co-title-right">
        <div class="co-title-breathe"><i></i><i></i><i></i><i></i><i></i><i></i></div>
      </div>
    </div>
    <div class="content">
      <div class="count"><span class="label">项目数：</span><span class="number">11,233</span>栋 </div>
      <div class="count"><span class="label">批准总面积：</span><span class="number">11,233</span>亩</div>
    </div>
  </div>
</template>

<script lang="ts">
import { Vue, Component } from 'vue-property-decorator'
import { CockpitApi } from '@/api/cockpit'

interface obj {
  count: string
}

@Component({
  name: 'Item6'
})
export default class Item6 extends Vue {
  private totalObj: obj = {
    count: '0'
  }
  private list1 = []
  private list2 = []
  created() {
    this.init()
    this.initList()
  }
  init() {
    CockpitApi.administrationApi('doc').then((res) => {
      this.totalObj = res.data.dataList && res.data.dataList[0]
    })
  }
  initList() {
    CockpitApi.administrationApi('docBorrowTop').then((res) => {
      this.list1 = (res.data && res.data.dataList).slice(0, 4) || []
      this.list2 = (res.data && res.data.dataList).slice(4, 8) || []
    })
  }
}
</script>
<style lang="scss" scoped>
@import '~@/styles/cockpit.scss';
.bpl1-bg {
  width: 100%;
  height: 100%;
  padding: 16px;
  background: url('~@/assets/cockpit/subdivision/administration/item-bg4.png') no-repeat 0/ 100% 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}
.content {
  display: flex;
  margin-top: 18px;
  .count {
    display: flex;
    width: 40%;
    flex-grow: 1;
    margin-right: 20px;
    align-items: center;
    background: url('~@/assets/cockpit/subdivision/securityOneMap/count-bg.png') no-repeat;
    background-size: 100% 100%;
    height: 58px;
    color: #fff;
    padding-left: 17px;
    margin-bottom: 8px;
    &:last-of-type {
      margin-right: 0;
    }
    .label {
      color: rgba(0, 181, 211, 1);
      // font-size: 18px !important;
    }
    .number {
      font-weight: 700;
      font-family: 'Roboto';
      margin-right: 5px;
      font-size: 22px !important;
    }
  }
}
</style>
